package neo.app.action;

import neo.core.common.PagingList;

public class EmployeeAction extends BaseAction {
	private PagingList employeeList;
	
	//员工列表
	public String list(){
		employeeList = getServMgr().getEmployeeService().getAllEmployee();
		return "list";
	}
	
	//添加员工 准备
	public String addPre(){
		return "addPre";
	}
	
	//添加员工
	public String add(){
		if(getServMgr().getEmployeeService().addEmployee(getParameters())){
			addMessage("添加成功");
			addRedirURL("返回员工列表", "employee!list.action");
		}else{
			addMessage("操作失败");
			addRedirURL("返回", "@back");
		}
		return EXECUTE_RESULT;
	}
	
	//-------------
	public PagingList getEmployeeList() {
		return employeeList;
	}

	public void setEmployeeList(PagingList employeeList) {
		this.employeeList = employeeList;
	}
	
}


